@import './variable.scss', './layout.scss', './util.scss', './component.scss';

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  word-wrap: break-word; // 解决长单词会溢出父元素
  -webkit-text-size-adjust: 100%; // 屏幕旋转字体大小保持一致
  -webkit-font-smoothing: antialiased; // 字体抗锯齿
  -webkit-overflow-scrolling: touch; // 让自定义滚动条拥有顺畅的滑动
  -webkit-tap-highlight-color: transparent; // 移动端点击不高亮
}

html {
  display: block;
  height: 100%;
  margin: 0 auto;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: var(--font-size);
  color: var(--color-white);
  line-height: 1.5;

  body,
  #app,
  .van-config-provider {
    display: block;
    height: 100%;
    background-color: var(--color-black);

    ul {
      list-style: none;
    }

    a {
      color: var(--color-primary);
      text-decoration: none;

      &:hover {
        text-decoration: underline;
      }
    }

    img {
      display: block;
      max-width: 100%;
      object-fit: cover;
    }

    input,
    textarea,
    button {
      font: inherit;
      line-height: inherit;
      caret-color: var(--color-primary);
    }
  }

  // 重置VantUI
  .van-button {
    height: 35px;

    &--plain {
      color: var(--color-white) !important;
      background-color: transparent !important;
    }
  }

  .van-field {
    height: 35px;
    background-color: rgba($color: #ffffff, $alpha: 0.2);
    border-radius: 100px;
    padding: 0;

    input {
      height: 35px;
      padding: 0 10px;
      color: var(--color-white);

      &::placeholder {
        color: var(--color-white);
      }
    }
  }

  .van-pagination {
    .van-pagination__item {
      flex: unset;
      width: 92px;
      opacity: 1;
      background-color: #c4e1ff;
      color: var(--color-primary);
      font-size: 13px;
      border-radius: 4px;
      height: 35px;

      &:active {
        opacity: 0.8;
      }

      &::after {
        display: none;
      }
    }

    .van-pagination__page-desc {
      height: 35px;
      color: white !important;
    }
  }

  .van-tabs {
    border-bottom: 1px solid #353536;

    &__nav {
      background-color: transparent;

      .van-tab {
        color: white !important;
        font-weight: unset;
      }
    }

    &__line {
      height: 2px;
      background: white;
    }
  }

  .van-popup {
    &--center {
      overflow: unset;
      background-color: transparent;
    }
  }

  .van-nav-bar {
    left: 50%;
    width: 100%;
    max-width: 400px;
    transform: translateX(-50%);
    z-index: 20;
  }
}
